package com.cropdoctor.model.po;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.annotations.Result;

import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("file_chunk")
@ApiModel(value = "FileChunkPo",description = "文件分块记录相关Po")
public class FileChunkPo {
  @TableId(value = "id")
  private String eTag;
  @ApiModelProperty(value = "分块序列号")
  private int partNumber;
  @TableField("part_CRC")
  @ApiModelProperty(value = "文件crc64值")
  private Long partCRC;
  @ApiModelProperty(value = "文件大小")
  private Long partSize;
  @ApiModelProperty(value = "最终合并完成后的文件的md5值")
  private String fileMd5;
  @ApiModelProperty(value = "请求id")
  private String uploadId;
  @TableField(fill = FieldFill.INSERT)
  @ApiModelProperty(value = "创建时间",example = "2024-02-05 18:05:45")
//  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private LocalDateTime createDateTime;
}
